import request from '@/utils/request'

// 添加培训证书
export function addTrainCertificate(data) {
	return request({
		url: '/trainCertificate/add',
		method: 'post',
		data: data
	})
}

// 分页查询培训证书
export function getTrainCertificatePage(params) {
	return request({
		url: '/trainCertificate/getPage',
		method: 'get',
		params: params
	})
}

// 通过key删除培训证书
export function delTrainCertificate(data) {
	return request({
		url: `/trainCertificate/del/${data}`,
		method: 'post',
	})
}

// 通过key查询培训证书
export function getTrainCertificateDetailsByKey(params) {
	return request({
		url: '/trainCertificate/getByKey',
		method: 'get',
		params: params
	})
}

// 修改培训证书
export function editTrainCertificate(data) {
	return request({
		url: '/trainCertificate/upd',
		method: 'post',
		data: data
	})
}
